package com.project.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

/**
 * 采购明细实体类
 */
@TableName("t_procurement_info")
public class ProcurementInfoBean {
    /**
     * 采购明细ID
     */
    @TableId(value = "pk_pinfoId", type = IdType.AUTO)
    private Integer id;
    @TableField("fk_productId")
    private String productId;
    @TableField("fk_procurementId")
    private Integer procurementId;
    @TableField("pi_buyPrice")
    private Integer buyPrice;
    /**
     * 商品对象
     */
    @TableField(exist = false)
    private ProductBean product;
    /**
     * 采购对象
     */
    @TableField(exist = false)
    private ProcurementBean procurement;
    /**
     * 采购数量
     */
    @TableField("pi_buyNumber")
    private Integer buyNumber;

    public ProcurementInfoBean(String productId, Integer procurementId, Integer buyPrice, Integer buyNumber) {
        this.productId = productId;
        this.procurementId = procurementId;
        this.buyPrice = buyPrice;
        this.buyNumber = buyNumber;
    }

    public ProcurementInfoBean() {
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getProductId() {
        return productId;
    }

    public void setProductId(String productId) {
        this.productId = productId;
    }

    public Integer getProcurementId() {
        return procurementId;
    }

    public void setProcurementId(Integer procurementId) {
        this.procurementId = procurementId;
    }

    public Integer getBuyPrice() {
        return buyPrice;
    }

    public void setBuyPrice(Integer buyPrice) {
        this.buyPrice = buyPrice;
    }

    public ProductBean getProduct() {
        return product;
    }

    public void setProduct(ProductBean product) {
        this.product = product;
    }

    public ProcurementBean getProcurement() {
        return procurement;
    }

    public void setProcurement(ProcurementBean procurement) {
        this.procurement = procurement;
    }

    public Integer getBuyNumber() {
        return buyNumber;
    }

    public void setBuyNumber(Integer buyNumber) {
        this.buyNumber = buyNumber;
    }

    @Override
    public String toString() {
        return "ProcurementInfoBean{" +
                "id=" + id +
                ", productId='" + productId + '\'' +
                ", procurementId=" + procurementId +
                ", buyPrice=" + buyPrice +
                ", product=" + product +
                ", procurement=" + procurement +
                ", buyNumber=" + buyNumber +
                '}';
    }
}
